Python Concurrent Programming: Asynchronous Executions in Python
Python Concurrent Programming: Asynchronous Executions in Python
- discover the key concepts covered in this course
- create a pool of processes to which tasks can be submitted
- use the map function of a multithreading.Pool instance to submit multiple tasks to a process pool
- recognize the use of futures objects to execute tasks asynchronously
- compare the performance of process pools and thread pools for tasks that are network-bound
- compare the performance of process pools and thread pools for tasks which are CPU-bound
- create and execute a coroutine using the asyncio module
- use the run, create_task, and gather functions in the asyncio modules to execute tasks
- summarize process pools and contrast multithreading and multiprocessing in Python
Explore using pools of threads and processes as well as the asyncio library to run tasks asynchronously.
Python Concurrent Programming: Introduction to Concurrent Programming
Python Concurrent Programming: Introduction to Concurrent Programming
- discover the key concepts covered in this course
- recognize what sequential execution is and what its limitations are
- describe multithreading and compare its performance with a sequential execution of tasks
- identify the specific use cases for multithreading
- summarize multiprocessing and contrast it with multithreading
- describe the implementation of threads and processes in the Python language
- recognize what a race condition is and when it can occur with concurrent programming
- outline how locks can help concurrent tasks synchronize their actions on shared resources
- summarize how semaphores can restrict the number of concurrent tasks accessing a shared resource
- identify the use cases for event and condition objects in Python and distinguish between the two
- recognize when a deadlock can occur in an application and the actions you can take to avoid it
- enumerate the built-in data structures available in Python for concurrent programming
- outline how pools of threads and processes can optimize concurrency in your application
- recall the different synchronization mechanisms in Python and the conditions necessary for deadlocks
Delve into the use of threads and processes to execute tasks concurrently in Python and discover available options for synchronizing concurrent tasks.
Python Concurrent Programming: Multiprocessing in Python
Python Concurrent Programming: Multiprocessing in Python
- discover the key concepts covered in this course
- describe the different types of Queue objects available in Python
- implement producer and consumer threads that add to and remove from a queue
- define, initialize, and execute a process in Python
- distinguish between multiprocessing and multithreading in the context of sharing data in memory
- share data between processes using shared memory
- share complex Python data between processes using the Manager class
- implement locks to allow only one process to update a shared resource
- use queues and pipes to enable communication between concurrent processes
- recall the ways in which processes can share data and distinguish between Queue and Pipe
Examine the creation and management of processes in Python including synchronization mechanisms and inter-process communication, and contrast them with threads.
Python Concurrent Programming: Multithreading in Python
Python Concurrent Programming: Multithreading in Python
- discover the key concepts covered in this course
- initialize and execute a thread in Python
- set a name for a thread and ensure a thread waits for a created thread to complete
- define your own type to run in a thread by deriving the multithreading.Thread class
- execute two threads concurrently to save time relative to a sequential execution
- identify what a race condition is and when this may occur with multithreading
- use a lock to synchronize threads that update a shared resource
- recognize the conditions under which a deadlock may occur
- define tasks in such a manner that deadlocks will not occur
- create semaphores in Python and recognize the effect of calling their acquire and release methods
- describe the use of BoundedSemaphores to restrict the number of times a semaphore can be released
- define threads that will wait for an event to occur before they can proceed
- create a condition instance that will have multiple threads waiting for data to be generated
- recall how to retrieve details about running threads and describe semaphores in Python
Explore the creation and management of concurrent threads in Python, including the use of various synchronization mechanisms such as locks, semaphores, and events.